package com.filmbooks.fragment.news;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.filmbooks.R;
import com.filmbooks.fragment.home.HomeFragment;
import com.zyw.horrarndoo.sdk.base.fragment.BaseCompatFragment;

import me.yokeyword.fragmentation.SupportFragment;

/**
 * Created by heshuxiang on 2018/2/28.
 * 描述：
 * 公司：盟将威
 * 作者：heshuxiang
 * 日期：2018/2/28.
 * 工程：FilmBooks
 * 包：com.filmbooks.fragment
 */

public class NewsRootFragment extends BaseCompatFragment {

    public static SupportFragment newInstance() {
        Bundle bundle = new Bundle();
        NewsRootFragment fragment = new NewsRootFragment();
        fragment.setArguments(bundle);
        return fragment;
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_home;
    }

    @Override
    public void initUI(View view, @Nullable Bundle savedInstanceState) {
        if (findChildFragment(HomeFragment.class) == null) {
            loadRootFragment(R.id.fl_contaier,HomeFragment.newInstance());
        }
    }
}
